package com.vhall.component.controller.interactive;

import com.vhall.component.controller.interactive.facade.DocumentInnerFacade;
import com.vhall.component.entity.account.dto.IndexDto;
import com.vhall.component.entity.export.dto.AdminExportDocumentQueryCondition;
import com.vhall.component.entity.record.RecordEntityDTO;
import com.vhall.component.entity.room.RoomDocumentsEntity;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.service.interactive.DocumentsInnerService;
import com.vhall.component.service.interactive.DocumentsRoomService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author lsl
 * @since 2021/6/11
 */
@VhallComponent
public class DocumentInnerController implements DocumentInnerFacade {


    @Autowired
    private DocumentsInnerService documentsInnerService;

    @Autowired
    private DocumentsRoomService documentsRoomService;

    @Override
    public Integer getDocumentStatusExist(String ilId, RecordEntityDTO recordEntityDTO) {
        return documentsInnerService.getDocumentStatusExist(ilId, recordEntityDTO);
    }

    @Override
    public IndexDto getCount(String beginTime) {
        return documentsInnerService.getCount(beginTime);
    }

    @Override
    public Integer countForAdminExport(AdminExportDocumentQueryCondition condition) {
        return documentsInnerService.countForAdminExport(condition);
    }

    @Override
    public RoomDocumentsEntity getDocumentById(String documentId, String roomId) {
        return documentsRoomService.getInfo(documentId, roomId);
    }
}
